package com.baidu.travel.controller;
import com.alibaba.fastjson.JSONObject;
import com.baidu.travel.domain.LogtablePO;
import com.baidu.travel.domain.QueryCondition;
import com.baidu.travel.service.LogtableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/LogTable")
public class LogTableController {
    @Autowired
    private LogtableService logtableService;

    @RequestMapping("/getByPage")
    @ResponseBody
    public Object getByPage(QueryCondition queryCondition)  {
        List<LogtablePO>  logtableList=logtableService.getByPage(queryCondition);
        return JSONObject.toJSONString(logtableList);

        }
}
